package com.ktwlrj.securitycenter.service;

import com.ktwlrj.core.feign.args.SysCredentialsConfigArgs;
import com.ktwlrj.core.feign.dto.BusiSimpleInfo;
import com.ktwlrj.core.feign.dto.MemberDto;
import com.ktwlrj.core.feign.dto.PermissionInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 授权相关服务层接口
 *
 * @author zhouxuanhong
 * @date 2019-07-18 10:43
 * @since JDK1.8
 */
public interface SystemService {
    /**
     * 登录
     *
     * @param request ${@link HttpServletRequest}
     * @return List<PermissionInfo> ${@link List<PermissionInfo>}
     * @throws RuntimeException ${@link RuntimeException}
     * @author zhouxuanhong
     * @date 2019-07-18 10:47
     */
    List<PermissionInfo> auth(HttpServletRequest request) throws RuntimeException;


    /**
     * 业务取号
     * @param tnRuleCode 取号编码
     * @return
     * @throws RuntimeException
     */
    String takeNumber(String tnRuleCode) throws RuntimeException;


    /**
     * 业务规则
     * @param dictionaryCode 字典编码
     * @return
     * @throws RuntimeException
     */
    Object businessRule(String dictionaryCode) throws RuntimeException;


    /**
     * 获取要件配置
     * @param busiId 业务编号
     * @return
     * @throws RuntimeException
     */
    List<SysCredentialsConfigArgs> getBusiConfigOrCredentials(String busiId) throws RuntimeException;


    /**
     * 获取用户所在机构下的所用人员列表
     * @return
     * @throws RuntimeException
     */
    List<MemberDto> getListMemberByOrgId() throws RuntimeException;


    /**
     *获取业务列表
     * @param authCode 权限编码
     * @return
     * @throws RuntimeException
     */
    List<BusiSimpleInfo> getBusiList(String authCode) throws RuntimeException;
}
